<template>
  <div class="body">
    <div class="body-top">
      <div class="body-top-title">
        <el-select v-model="station" placeholder="请选择" :popper-append-to-body="false" @change="changeStation">
          <span slot="prefix">站点:</span>
          <el-option v-for="item in stations" :key="item.id" :label="item.name" :value="item.id" />
        </el-select>
      </div>
    </div>
    <div class="body-content">
      <div class="body-content-top">
        <div class="body-content-top-left"><span>巡视点</span></div>
        <div class="body-content-top-right"><span>点位结果浏览</span></div>
      </div>
      <div class="body-content-bottom">
        <div class="body-content-bottom-left">
          <el-input v-model="keword" placeholder="请输入关键字搜索">
            <i slot="suffix" class="el-input__icon el-icon-search" @click="searchPoints" />
          </el-input>
          <el-checkbox v-model="checkAll" class="filter-checkbox" :indeterminate="isIndeterminate"
            @change="handleCheckAllChange">全选</el-checkbox>
          <el-divider />
          <el-tree ref="tree" class="filter-tree" node-key="areaCode" show-checkbox :data="points" :props="defaultProps"
            :filter-node-method="filterNode" @check-change="handleCheckChange" />
        </div>
        <div class="body-content-bottom-middle">
          <div class="body-content-bottom-middle-block">
            <div class="custom-date">
              <span>开始时间：</span>
              <el-date-picker v-model="startTime" type="datetime" placeholder="请选择开始时间" />
            </div>
            <div class="custom-date">
              <span>结束时间：</span>
              <el-date-picker v-model="endTime" type="datetime" placeholder="请选择结束时间" />
            </div>
            <div class="custom-btn">
              <el-button @click="search">查询</el-button>
              <el-button @click="reset">重置</el-button>
            </div>
          </div>
          <el-divider />
          <div class="body-content-bottom-middle-review">
            <el-button @click="batchReviewDialog">批量审核</el-button>
          </div>
          <el-divider />
          <div class="body-content-bottom-middle-table">
            <el-table :data="pointData" style="width: 100%;" ref="multipleTable"
              @selection-change="handleSelectionChange">
              <el-table-column type="selection" width="50"></el-table-column>
              <el-table-column type="index" label="序号" width="80" />
              <el-table-column prop="devicePointName" label="点位名称" width="160" />
              <el-table-column prop="patrolTime" label="巡视时间" width="200" />
              <el-table-column prop="patrolValue" label="巡视值" />
              <el-table-column prop="checkValue" label="修正值" />
              <el-table-column prop="alarmLevelName" label="告警等级">
                <template slot-scope="scope">
                  <span :style="{ color: scope.row.alarmLevel == '0' ? '' : 'rgba(224, 57, 45, 1)' }">
                    {{ scope.row.alarmLevelName }}
                  </span>
                </template>
              </el-table-column>
              <el-table-column prop="checkStatusName" label="审核状态" />
              <el-table-column label="操作" width="100" class="end-column">
                <template slot-scope="scope">
                  <el-button type="text" size="small" @click="handleQuery(scope.row)"><span
                      style="color: rgba(0, 255, 255, 1);">查看</span></el-button>
                </template>
              </el-table-column>
            </el-table>
          </div>
          <el-divider />
          <div class="body-content-bottom-middle-page">
            <el-pagination background layout="total, prev, pager, next" :page-size="pageSize" :total="total"
              :current-page.sync="currentPage" @current-change="handlePage" />
          </div>
        </div>
        <div class="body-content-bottom-right">
          <div class="alarm-image">
            <img v-if="pointImgUrl" :src="pointImgUrl" alt="告警图片">
          </div>
          <el-divider />
          <div class="body-content-bottom-right-text">
            <el-row>
              <el-col :span="8">
                <span class="text-tag">点位名称:</span>
              </el-col>
              <el-col :span="8">
                <span class="text-content">{{ devicePointName }}</span>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="8">
                <span class="text-tag">任务名称:</span>
              </el-col>
              <el-col :span="8">
                <span class="text-content">{{ taskName }}</span>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="8">
                <span class="text-tag">巡视时间:</span>
              </el-col>
              <el-col :span="8">
                <span class="text-content">{{ patrolTime }}</span>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="8">
                <span class="text-tag">识别类型:</span>
              </el-col>
              <el-col :span="8">
                <span class="text-content">{{ recognitionTypeName }}</span>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="8">
                <span class="text-tag">巡视值:</span>
              </el-col>
              <el-col :span="8">
                <span class="text-content">{{ patrolValue }}</span>
              </el-col>
            </el-row>
            <el-row>
              <el-col :span="8">
                <span class="text-tag">告警条件:</span>
              </el-col>
              <el-col :span="8">
                <span class="text-content">{{ alarmCondition }}</span>
              </el-col>
            </el-row>
          </div>
          <el-divider />
          <div class="body-content-bottom-right-review">
            <div class="review-content">
              <el-select v-model="recognitionState" placeholder="请选择" :popper-append-to-body="false">
                <span slot="prefix">识别内容：</span>
                <el-option v-for="item in recognitions" :key="item.key" :label="item.value" :value="item.key" />
              </el-select>
            </div>
            <div class="review-content">
              <el-input v-model="checkValue" placeholder="请输入" :disabled="checkValueStatus">
                <span slot="prefix">修正值：</span>
              </el-input>
            </div>
            <div class="review-content">
              <el-select v-model="alarmLevel" placeholder="请选择" :popper-append-to-body="false">
                <span slot="prefix">告警等级：</span>
                <el-option v-for="item in alarmLevels" :key="item.alarmLevel" :label="item.alarmLevelName"
                  :value="item.alarmLevel" />
              </el-select>
            </div>
            <div class="review-content">
              <el-input v-model="alarmContent" placeholder="请输入">
                <span slot="prefix">告警内容：</span>
              </el-input>
            </div>
            <div class="review-btn">
              <el-button type="info" @click="review">提交审核</el-button>
            </div>
          </div>
        </div>
      </div>
    </div>
    <el-dialog title="批量审核" :visible.sync="dialogFormVisible" :before-close="closeDialog" width="30%">
      <el-form :model="batchReviewData">
        <el-form-item>
          <el-select v-model="batchReviewData.recognitionState" placeholder="请选择" :popper-append-to-body="false">
            <span slot="prefix">识别内容：</span>
            <el-option v-for="item in recognitions" :key="item.key" :label="item.value" :value="item.key" />
          </el-select>
        </el-form-item>
        <el-form-item>
          <el-input v-model="batchReviewData.checkValue" placeholder="请输入" :disabled="true">
            <span slot="prefix">修正值：</span>
          </el-input>
        </el-form-item>
        <el-form-item>
          <el-select v-model="batchReviewData.alarmLevel" placeholder="请选择" :popper-append-to-body="false">
            <span slot="prefix">告警等级：</span>
            <el-option v-for="item in alarmLevels" :key="item.alarmLevel" :label="item.alarmLevelName"
              :value="item.alarmLevel" />
          </el-select>
        </el-form-item>
        <el-form-item>
          <el-input v-model="batchReviewData.alarmContent" placeholder="请输入">
            <span slot="prefix">告警内容：</span>
          </el-input>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button @click="cancel">取 消</el-button>
        <el-button type="primary" @click="confirm">确 定</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
import axios from 'axios'

export default {
  data() {
    return {
      stations: [],
      station: null,
      keword: '',
      points: [],
      defaultProps: {
        children: 'children',
        label: 'areaName'
      },
      isIndeterminate: false,
      checkAll: false,
      startTime: null,
      endTime: null,
      pointData: [],
      currentPage: null,
      pageSize: 10,
      total: null,
      pointImgUrl: null,
      devicePointCode: '',
      devicePointName: '',
      taskName: '',
      patrolTime: '',
      recognitionTypeName: '',
      patrolValue: '',
      alarmCondition: '',
      defectDefine: '',
      defectLevel: null,
      defectStatus: null,
      recognitionState: null,
      taskRunCode: '',
      recognitions: [{
        key: 'R',
        value: '识别正确'
      },
      {
        key: 'W',
        value: '识别错误'
      }, {
        key: 'U',
        value: '无法识别'
      }],
      recognition: null,
      alarmLevels: [],
      alarmLevel: null,
      checkValue: '',
      alarmContent: '',
      batchReviewData: {
        alarmContent: '',
        alarmLevel: null,
        checkValue: '',
        defectLevel: null,
        defectStatus: null,
        patrolResultIdList: null,
        recognitionState: null
      },
      dialogFormVisible: false,
      multipleSelection: [],
      checkValueStatus: false
    }
  },
  methods: {
    searchPoints() {
      this.$refs.tree.filter(this.keword)
    },
    filterNode(value, data) {
      if (!value) return true
      return data.areaName.indexOf(value) !== -1
    },
    handleCheckAllChange() {
      this.isIndeterminate = false
      if (this.checkAll) {
        this.checkAll = true
        this.$refs.tree.setCheckedNodes(this.points)
        this.expandAll(true)
      } else {
        this.checkAll = false
        this.$refs.tree.setCheckedNodes([])
        this.expandAll(false)
      }
    },
    expandAll(flag) {
      if (flag) {
        for (var i in this.$refs.tree.store.nodesMap) {
          this.$refs.tree.store.nodesMap[i].expanded = true
        }
      } else {
        for (var j in this.$refs.tree.store.nodesMap) {
          this.$refs.tree.store.nodesMap[j].expanded = false
        }
      }
    },
    handleCheckChange() {
      const checkeds = this.$refs.tree.getCheckedNodes(false, true).length
      const allNodes = Object.keys(this.$refs.tree.store.nodesMap).length
      if (checkeds === allNodes) {
        this.isIndeterminate = false
        this.checkAll = true
      } else {
        this.checkAll = false
        if (checkeds === 0) {
          this.isIndeterminate = false
        } else {
          this.isIndeterminate = true
        }
      }
    },
    changeStation() {
      this.currentPage = 1
      this.total = 0
      this.getPatrolPoint()
      this.searchPointResult(this.currentPage, null, false)
    },
    handleSelectionChange(val) {
      this.multipleSelection = val
    },
    closeDialog() {
      this.batchReviewData.alarmContent = ''
      this.batchReviewData.alarmLevel = null
      this.batchReviewData.checkValue = ''
      this.batchReviewData.defectLevel = null
      this.batchReviewData.defectStatus = null
      this.batchReviewData.patrolResultIdList = null
      this.batchReviewData.recognitionState = null
      this.dialogFormVisible = false
    },
    cancel() {
      this.closeDialog()
    },
    confirm() {
      this.batchReview()
    },
    getPointCodes() {
      const leafs = this.$refs.tree.getCheckedNodes(true, false)
      const pointCodes = leafs.map(item => item.pointCode)
      if (pointCodes == null || pointCodes.length == 0)
        return null
      return pointCodes.join(',')
    },
    search() {
      const pointCode = this.getPointCodes()
      this.currentPage = 1
      this.searchPointResult(this.currentPage, pointCode, false)
    },
    reset() {
      this.startTime = null
      this.endTime = null
    },
    review() {
      axios.post(`http://${this.$store.getters.serverUrl}/station/taskData/batchReview`,
        {
          alarmContent: this.alarmContent,
          alarmLevel: this.alarmLevel,
          checkValue: this.checkValue,
          defectDefine: this.defectDefine,
          defectLevel: this.defectLevel,
          defectStatus: this.defectStatus,
          devicePointCodeList: [this.devicePointCode],
          recognitionState: this.recognitionState,
          taskRunCode: this.taskRunCode,
        },
        {
          params: {
            masterId: this.station
          },
          headers: {
            Gz_security_token: this.$store.getters.Gz_security_token
          }
        }).then(({ data }) => {
          if (data.success) {
            this.$message({
              type: 'success',
              message: '审核成功'
            })
            const pointCode = this.getPointCodes()
            this.searchPointResult(this.currentPage, pointCode, true)
          } else {
            this.$message({
              type: 'error',
              message: '审核失败'
            })
          }
        }).catch(() => {
          this.$message({
            type: 'error',
            message: '审核失败'
          })
        })
    },
    batchReviewDialog() {
      if (this.multipleSelection.length == 0) {
        this.$message({
          type: 'warning',
          message: '请至少选择一条数据!',
          duration: 3000
        })
        return
      }
      this.dialogFormVisible = true
    },
    batchReview() {
      this.batchReviewData.patrolResultIdList = this.multipleSelection.map(item => item.id)
      axios.post(`http://${this.$store.getters.serverUrl}/station/taskData/batchReviewByIds`, this.batchReviewData,
        {
          params: {
            masterId: this.station
          },
          headers: {
            Gz_security_token: this.$store.getters.Gz_security_token
          }
        }).then(({ data }) => {
          if (data.success) {
            this.$message({
              type: 'success',
              message: '批量审核成功'
            })
            this.closeDialog()
            const pointCode = this.getPointCodes()
            this.searchPointResult(this.currentPage, pointCode, false)
          } else {
            this.$message({
              type: 'error',
              message: '批量审核失败'
            })
          }
        }).catch(() => {
          this.$message({
            type: 'error',
            message: '批量审核失败'
          })
        })
    },
    handleQuery(row) {
      this.devicePointCode = row.devicePointCode
      this.devicePointName = row.devicePointName
      this.taskName = row.taskName
      this.patrolTime = row.patrolTime
      this.recognitionTypeName = row.recognitionTypeName
      this.patrolValue = row.patrolValue
      this.alarmCondition = row.alarmCondition
      this.recognition = row.recognitionType
      this.checkValue = row.checkValue
      this.alarmLevel = row.alarmLevel
      this.alarmContent = row.alarmContent
      this.defectLevel = row.defectLevel
      this.recognitionState = row.recognitionState
      this.taskRunCode = row.taskRunCode
      this.getPointImage(row.devicePointCode, row.taskRunCode)
      this.getAlarmLevel()
      if (this.recognitionState == 'R')
        this.checkValueStatus = true
      // this.getThreePhaseCompareValue(row.taskRunCode, row.devicePointCode)
    },
    handlePage(currentPage) {
      const pointCode = this.getPointCodes()
      this.searchPointResult(currentPage, pointCode, false)
    },
    // getThreePhaseCompareValue(taskCode,pointCode){
    //   axios.post('http://183.6.107.239:23434/station/taskData/getThreePhaseCompareValue', null, {
    //     params: {
    //         taskRunCode: taskCode,
    //         devicePointCode: pointCode,
    //         masterId: this.station
    //       },
    //     headers: {
    //       Gz_security_token: this.$store.getters.Gz_security_token
    //     }
    //   }).then(({ data }) => {
    //     if (data.success) {
    //       if (data.data != null)
    //     }
    //   })
    // },
    getMasterList() {
      axios.post(`http://${this.$store.getters.serverUrl}/station/user/masterList`, null, {
        headers: {
          Gz_security_token: this.$store.getters.Gz_security_token
        }
      }).then(({ data }) => {
        if (data.success) {
          this.stations = data.data
          if (this.stations != null && this.stations.length > 0)
            this.station = this.stations[0].id
        }
      })
    },
    getPatrolPoint() {
      axios.post(`http://${this.$store.getters.serverUrl}/station/taskCustomizationControl/getAreaTree`, null, {
        params: {
          masterId: this.station
        },
        headers: {
          Gz_security_token: this.$store.getters.Gz_security_token
        }
      }).then(({ data }) => {
        if (data.success) {
          this.points = data.data
        }
      })
    },
    searchPointResult(currentPage, pointCode, flag) {
      //第三个参数表示刷新数据后是否定位到查看数据的那一行
      axios.post(`http://${this.$store.getters.serverUrl}/station/taskResult/getHistoryDataByPoints`,
        {
          curPage: currentPage,
          devicePointCodes: pointCode,
          pageSize: this.pageSize,
          startTime: this.formattedTime(this.startTime),
          endTime: this.formattedTime(this.endTime)
        },
        {
          params: {
            masterId: this.station
          },
          headers: {
            Gz_security_token: this.$store.getters.Gz_security_token
          }
        }).then(({ data }) => {
          if (data.success) {
            if (data.data != null) {
              this.pointData = data.data.patrolResultList
              this.total = data.data.pageInfo.total
              if (this.pointData != null && this.pointData.length > 0) {
                if (!flag)
                  this.handleQuery(this.pointData[0])
              }
            }
          }
        })
    },
    getPointImage(pointCode, taskCode) {
      axios.post(`http://${this.$store.getters.serverUrl}/station/taskResult/getMultimediaInfoByPointCode`, null,
        {
          params: {
            taskRunCode: taskCode,
            devicePointCode: pointCode,
            masterId: this.station
          },
          headers: {
            Gz_security_token: this.$store.getters.Gz_security_token
          }
        }).then(({ data }) => {
          if (data.success) {
            if (data.data != null && data.data.imageFile != null) {
              this.pointImgUrl = 'http://' + this.$store.getters.serverUrl + data.data.imageFile
            } else {
              this.pointImgUrl = null
            }
          }
        })
    },
    getAlarmLevel() {
      axios.post(`http://${this.$store.getters.serverUrl}/station/taskData/getAlarmLevelList`, null, {
        params: {
          masterId: this.station
        },
        headers: {
          Gz_security_token: this.$store.getters.Gz_security_token
        }
      }).then(({ data }) => {
        if (data.success) {
          this.alarmLevels = data.data
        }
      })
    },
    formattedTime(dateTime) {
      if (dateTime == null)
        return null
      const year = dateTime.getFullYear()
      const month = (dateTime.getMonth() + 1).toString().padStart(2, '0')
      const day = dateTime.getDate().toString().padStart(2, '0')
      const hour = dateTime.getHours().toString().padStart(2, '0')
      const minute = dateTime.getMinutes().toString().padStart(2, '0')
      const second = dateTime.getSeconds().toString().padStart(2, '0')
      return `${year}-${month}-${day} ${hour}:${minute}:${second}`
    }
  },
  created() {
    const now = new Date()
    const year = now.getFullYear()
    const month = now.getMonth() + 1
    const day = now.getDate()
    this.startTime = new Date(year, month - 1, day - 7, 0, 0, 0)
    this.endTime = new Date(year, month - 1, day, 23, 59, 59)
    this.currentPage = 1
    this.total = 0
  },
  mounted() {
    this.getMasterList()
    this.getPatrolPoint()
    this.searchPointResult(this.currentPage, null, false)
  }
}
</script>
<style scoped>
.body {
  margin-left: 20px;
  width: 1876px;
  height: 940px;
  background: rgba(1, 55, 66, 1);
  border: 1px solid rgba(0, 188, 191, 1);
  box-shadow: inset 20px 0px 35px -9px rgba(6, 115, 115, 1);

  .el-dialog {
    background: rgba(52, 65, 86, 1) !important;

    .el-dialog__header {
      background: linear-gradient(90deg, rgba(0, 255, 255, 0.4) 0%, rgba(13, 128, 236, 0) 100%);

      .el-dialog__title {
        font-size: 20px;
        font-weight: 700;
        color: rgba(0, 255, 255, 1);
      }
    }

    .el-dialog__body {
      padding-bottom: 0;
    }

    .el-dialog__footer {
      text-align: center;
      padding-top: 0;

      .el-button--default {
        border-radius: 2px;
        background: rgba(80, 211, 225, 0.5);
        box-shadow: inset 0px 0px 4px rgba(80, 211, 225, 0.25);
        border: none;
        font-size: 16px;
        font-weight: 500;
        color: rgba(255, 255, 255, 1);
      }

      .el-button--primary {
        border-radius: 2px;
        background: linear-gradient(180deg, rgba(52, 213, 235, 1) 0%, rgba(12, 150, 168, 1) 100%);
        border: none;
        font-size: 16px;
        font-weight: 500;
        color: rgba(255, 255, 255, 1);
      }
    }

    .el-input__prefix {
      width: 70px;
      height: 100%;
      display: flex;
      align-items: center;
      margin-left: 10px;
      font-size: 14px;
      font-weight: 500;
      color: rgba(229, 229, 229, 1);
      border: none;
    }

    .el-input__inner {
      padding-left: 90px;
      padding-bottom: 1px;
      width: 100%;
      font-size: 14px;
      font-weight: 500;
      letter-spacing: 1px;
      color: rgba(229, 229, 229, 1);
      background: rgba(209, 209, 209, 0.15);
      box-shadow: inset 0px 0px 4px rgba(80, 211, 225, 0.25);
      border: none;
    }

    .el-input__inner:disabled {
      background: #606874;
    }

    .el-select {
      width: 100%;
    }

    .el-select-dropdown {
      background: rgba(7, 131, 140, 1);
      border: 1px solid rgba(7, 131, 140, 1);
    }

    .el-select-dropdown__item {
      font-size: 14px;
      font-weight: 500;
      letter-spacing: 1px;
      background: rgba(7, 131, 140, 1);
      color: rgba(255, 255, 255, 1);
    }

    .el-select-dropdown__item:hover {
      background: rgba(17, 173, 240, 0.1);
      border: 1px solid rgba(17, 173, 240, 0.2);
      box-shadow: inset 0px 0px 9.34px rgba(0, 153, 255, 0.5);
    }

    .el-select-dropdown__item.selected {
      color: #409EFF;
    }
  }
}

.body-top {
  height: 56px;
  background: rgba(80, 211, 225, 0.15);
  display: flex;
  align-items: center;
}

.body-top-title {
  margin-left: 20px;

  .el-input__prefix {
    display: flex;
    align-items: center;
    font-size: 22px;
    font-weight: 500;
    color: rgba(223, 238, 243, 1);
  }

  .el-input__inner {
    padding-bottom: 2px;
    padding-left: 70px;
    width: 180px;
    font-size: 22px;
    font-weight: 500;
    letter-spacing: 1px;
    background: none;
    border: none;
    color: rgba(223, 238, 243, 1);
  }

  .el-select-dropdown {
    background: rgba(7, 131, 140, 1);
    border: 1px solid rgba(7, 131, 140, 1);
  }

  .el-select-dropdown__item {
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 1px;
    background: rgba(7, 131, 140, 1);
    color: rgba(223, 238, 243, 1);
  }

  .el-select-dropdown__item:hover {
    background: rgba(17, 173, 240, 0.1);
    border: 1px solid rgba(17, 173, 240, 0.2);
    box-shadow: inset 0px 0px 9.34px rgba(0, 153, 255, 0.5);
    font-size: 20px;
  }

  .el-select-dropdown__item.selected {
    color: #409EFF;
  }
}

.body-content-top {
  display: flex;
  align-items: center;
  font-size: 20px;
  font-weight: 700;
  color: rgba(0, 255, 255, 1);
}

.body-content-top-left {
  display: flex;
  align-items: center;
  height: 60px;
  width: 350px;
  margin: 16px 21px 15px 18px;
  padding-left: 51px;
  background: linear-gradient(90deg, rgba(0, 255, 255, 0.4) 0%, rgba(13, 128, 236, 0) 100%);
  letter-spacing: 4px;
}

.body-content-top-right {
  display: flex;
  align-items: center;
  height: 60px;
  width: 1465px;
  margin-top: 16px;
  margin-bottom: 15px;
  padding-left: 51px;
  background: linear-gradient(90deg, rgba(0, 255, 255, 0.4) 0%, rgba(13, 128, 236, 0) 100%);
  letter-spacing: 4px;
}

.body-content-bottom {
  display: flex;
  width: 1836px;
  height: 776px;
  margin-left: 18px;

  .el-divider--horizontal {
    height: 1px;
    background: linear-gradient(270deg, rgba(255, 255, 255, 0) 0%, rgba(135, 135, 135, 0.5) 49.31%, rgba(255, 255, 255, 0) 100%);
    display: block;
    margin: 10px 0;
  }
}

.body-content-bottom-left {
  width: 350px;
  height: 776px;
  background: rgba(13, 79, 90, 1);

  .el-input {
    width: 320px;
    height: 48px;
    margin-top: 20px;
    left: 50%;
    transform: translateX(-50%);
  }

  .el-icon-search {
    margin-right: 10px;
    font-size: 20px;
    height: 48px;
    color: rgba(0, 255, 255, 1);
    display: flex;
    align-items: center;
  }

  .el-icon-search:hover {
    cursor: pointer;
  }

  .el-input__inner {
    font-size: 16px;
    font-weight: 500;
    color: rgba(255, 255, 255, 1);
    width: 100%;
    height: 100%;
    background: rgba(80, 211, 225, 0.15);
    border: 2px solid rgba(15, 217, 180, 1);
    box-shadow: inset 3px 0px 0px rgba(80, 211, 225, 0.25);
    caret-color: rgba(255, 255, 255, 1);
  }

  .filter-tree {
    width: 320px;
    height: 620px;
    background: rgba(13, 79, 90, 1);
    color: rgba(255, 255, 255, 1);
    font-size: 16px;
    font-weight: 500;
    left: 50%;
    transform: translateX(-50%);
    overflow-y: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
  }

  .filter-tree::-webkit-scrollbar {
    display: none;
  }

  .filter-checkbox {
    margin-top: 15px;
    margin-left: 40px;
    background: rgba(13, 79, 90, 1);
    color: rgba(255, 255, 255, 1);
    font-size: 16px;
    font-weight: 500;
  }

  .el-tree-node {
    border-bottom: 1px solid;
    border-image: linear-gradient(to right, rgba(255, 255, 255, 0), rgba(135, 135, 135, 0.5), rgba(255, 255, 255, 0)) 1 10;
  }

  .el-tree-node__label {
    font-size: 16px;
    font-weight: 500;
  }

  .el-tree .el-tree-node__content {
    height: 46px;
    background-color: rgba(13, 79, 90, 1);
  }

  .el-tree .el-tree-node__content:hover {
    background: rgba(189, 189, 189, 0.15);
    box-shadow: inset 0px 0px 4px rgba(80, 211, 225, 0.25);
  }

  .el-checkbox .el-checkbox__inner {
    border-radius: 50%;
    background-color: rgba(13, 79, 90, 1);
    border: 1px solid rgba(229, 230, 235, 1);
  }

  .el-checkbox .el-checkbox__input.is-checked .el-checkbox__inner {
    background: rgba(0, 125, 125, 1);
    border: 1px solid rgba(0, 125, 125, 1);
  }

  .el-checkbox__label {
    font-size: 16px;
    font-weight: 500;
    color: rgba(255, 255, 255, 1);
  }
}

.body-content-bottom-middle {
  width: 1000px;
  height: 776px;
  margin-left: 21px;
  margin-right: 10px;
  background: rgba(13, 79, 90, 1);

  .body-content-bottom-middle-block {
    display: flex;
    height: 72px;
    align-items: center;
  }

  .custom-date {
    font-size: 14px;
    font-weight: 500;
    color: rgba(229, 229, 229, 1);
    margin-left: 15px;
  }

  .el-input__prefix {
    display: none;
  }

  .el-input__inner {
    font-size: 14px;
    font-weight: 500;
    color: rgba(229, 229, 229, 1);
    padding-left: 10px;
    border: none;
    background: rgba(209, 209, 209, 0.15);
    box-shadow: inset 0px 0px 4px rgba(80, 211, 225, 0.25);
  }

  .custom-btn {
    flex: 1;
    text-align: right;
    margin-right: 13px;

    .el-button {
      width: 80px;
      height: 36px;
      border: none;
      border-radius: 2px;
      background: rgba(80, 211, 225, 0.5);
      box-shadow: inset 0px 0px 4px rgba(80, 211, 225, 0.25);
      font-size: 16px;
      font-weight: 500;
      color: rgba(255, 255, 255, 1);
    }
  }

  .body-content-bottom-middle-review {
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: right;

    .el-button {
      padding: 0;
      margin-right: 13px;
      width: 80px;
      height: 36px;
      border: 0.79px solid rgba(90, 144, 153, 1);
      border-radius: 2px;
      background: rgba(7, 140, 116, 0.05);
      font-size: 16px;
      font-weight: 500;
      color: rgba(0, 255, 255, 1);
    }
  }

  .body-content-bottom-middle-table {
    display: flex;
    margin-left: 15px;
    height: 535px;


    .el-checkbox .el-checkbox__inner {
      background-color: rgba(13, 79, 90, 1);
      border: 1px solid rgba(229, 230, 235, 1);
    }

    .el-checkbox .el-checkbox__input.is-checked .el-checkbox__inner {
      background: rgba(0, 125, 125, 1);
      border: 1px solid rgba(0, 125, 125, 1);
    }

    .el-table-column--selection {
      text-align: center;
    }

    .el-table {
      background: rgba(13, 79, 90, 1);
    }

    .el-table .el-table__row {
      height: 36px;
    }

    .el-table th {
      text-align: center;
      font-size: 14px;
      font-weight: 500;
      color: rgba(229, 229, 229, 1);
      background: rgba(13, 79, 90, 1);
      border: none;
    }

    .el-table td {
      text-align: center;
      font-size: 14px;
      font-weight: 500;
      color: rgba(229, 229, 229, 1);
      background: rgba(13, 79, 90, 1);
      border: none;
    }

    .el-table::before {
      background: none;
    }

    .end-column::before {
      background: none;
    }

    .el-button {
      font-size: 14px;
      font-weight: 500;
      color: rgba(229, 229, 229, 1);
    }

    .el-button:hover {
      cursor: pointer;
    }

    .el-table__fixed::before,
    .el-table__fixed-right::before {
      background: none;
    }

    .el-table__body tr:hover>td {
      background: rgba(52, 59, 69, 1);
    }

    .el-table--medium th,
    .el-table--medium td {
      padding: 4px 0;
    }
  }

  .body-content-bottom-middle-page {
    height: 57px;
    display: flex;
    justify-content: center;
    margin-top: 20px;

    .el-pagination__total {
      width: 60px;
      height: 28px;
      background: rgba(13, 79, 90, 1);
      color: rgba(193, 206, 222, 1);
      font-size: 12px;
      font-weight: 400;
      border: 1px solid rgba(177, 200, 230, 0.2);
      text-align: center;
    }

    .el-pagination .btn-prev {
      width: 24px;
      height: 28px;
      background: rgba(13, 79, 90, 1);
      color: rgba(193, 206, 222, 1);
      font-size: 12px;
      font-weight: 400;
      border: 1px solid rgba(177, 200, 230, 0.2);
    }

    .el-pagination .btn-prev:hover {
      background: rgba(30, 119, 135, 1);
      color: rgba(255, 255, 255, 1);
    }

    .el-pagination .btn-quickprev {
      width: 24px;
      height: 28px;
      background: rgba(13, 79, 90, 1);
      color: rgba(193, 206, 222, 1);
      font-size: 12px;
      font-weight: 400;
      border: 1px solid rgba(177, 200, 230, 0.2);
    }

    .el-pagination .btn-quickprev:hover {
      background: rgba(30, 119, 135, 1);
      color: rgba(255, 255, 255, 1);
    }

    .el-pagination .btn-next {
      width: 24px;
      height: 28px;
      background: rgba(13, 79, 90, 1);
      color: rgba(193, 206, 222, 1);
      font-size: 12px;
      font-weight: 400;
      border: 1px solid rgba(177, 200, 230, 0.2);
    }


    .el-pagination .btn-next:hover {
      background: rgba(30, 119, 135, 1);
      color: rgba(255, 255, 255, 1);
    }

    .el-pagination .btn-quicknext {
      width: 24px;
      height: 28px;
      background: rgba(13, 79, 90, 1);
      color: rgba(193, 206, 222, 1);
      font-size: 12px;
      font-weight: 400;
      border: 1px solid rgba(177, 200, 230, 0.2);
    }

    .el-pagination .btn-quicknext:hover {
      background: rgba(30, 119, 135, 1);
      color: rgba(255, 255, 255, 1);
    }


    .el-pagination .number {
      width: 24px;
      height: 28px;
      background: rgba(13, 79, 90, 1);
      color: rgba(193, 206, 222, 1);
      font-size: 12px;
      font-weight: 400;
      border: 1px solid rgba(177, 200, 230, 0.2);
    }

    .el-pagination .number:hover {
      background: rgba(30, 119, 135, 1);
      color: rgba(255, 255, 255, 1);
    }

    .el-pagination .number.active {
      background: rgba(30, 119, 135, 1);
      color: rgba(255, 255, 255, 1);
    }

    .el-pagination .el-icon-more {
      width: 24px;
      height: 28px;
      background: rgba(13, 79, 90, 1);
      color: rgba(193, 206, 222, 1);
      font-size: 12px;
      font-weight: 400;
      border: 1px solid rgba(177, 200, 230, 0.2);
    }

    .el-pagination .el-icon-more:hover {
      background: rgba(30, 119, 135, 1);
      color: rgba(255, 255, 255, 1);
    }
  }

}

.body-content-bottom-right {
  width: 455px;
  height: 776px;
  background: rgba(13, 79, 90, 1);

  .alarm-image {
    width: 415px;
    height: 232px;
  }

  img {
    margin: 18px 20px 0 20px;
    width: 100%;
    height: 100%;
  }

  .body-content-bottom-right-text {
    margin: 0 20px 0 20px;
    width: 415px;
    height: 180px;
    font-size: 14px;
    font-weight: 500;
    color: rgba(229, 229, 229, 1);

    .el-row {
      margin-top: 15px;
    }
  }

  .body-content-bottom-right-review {
    margin: 20px;
    width: 415px;
    height: 250px;
    font-size: 14px;
    font-weight: 500;
    color: rgba(229, 229, 229, 1);

    .review-content {
      margin-bottom: 12px;

      .el-input__prefix {
        width: 70px;
        height: 100%;
        display: flex;
        align-items: center;
        margin-left: 10px;
        font-size: 14px;
        font-weight: 500;
        color: rgba(229, 229, 229, 1);
        border: none;
      }

      .el-input__inner {
        padding-left: 90px;
        padding-bottom: 1px;
        width: 415px;
        font-size: 14px;
        font-weight: 500;
        letter-spacing: 1px;
        color: rgba(229, 229, 229, 1);
        background: rgba(209, 209, 209, 0.15);
        box-shadow: inset 0px 0px 4px rgba(80, 211, 225, 0.25);
        border: none;
      }

      .el-input__inner:disabled {
        background: #606874;
      }

      .el-select-dropdown {
        background: rgba(7, 131, 140, 1);
        border: 1px solid rgba(7, 131, 140, 1);
      }

      .el-select-dropdown__item {
        font-size: 14px;
        font-weight: 500;
        letter-spacing: 1px;
        background: rgba(7, 131, 140, 1);
        color: rgba(255, 255, 255, 1);
      }

      .el-select-dropdown__item:hover {
        background: rgba(17, 173, 240, 0.1);
        border: 1px solid rgba(17, 173, 240, 0.2);
        box-shadow: inset 0px 0px 9.34px rgba(0, 153, 255, 0.5);
      }

      .el-select-dropdown__item.selected {
        color: #409EFF;
      }
    }

    .review-btn {
      display: flex;
      align-items: center;
      justify-content: center;
      margin-top: 25px;

      .el-button {
        font-size: 16px;
        font-weight: 500;
        color: rgba(255, 255, 255, 1);
        border-radius: 2px;
        background: rgba(80, 211, 225, 0.5);
        box-shadow: inset 0px 0px 4px rgba(80, 211, 225, 0.25);
        border: none;
        width: 80px;
        height: 36px;
        padding: 0;
      }
    }
  }

}
</style>
